package com.cv.platform.controller.platform.report;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.controller.platform.report.vo.CvReportSaveReqVO;
import com.cv.platform.service.report.CvReportService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.cv.framework.common.pojo.Result.success;

/**
 * 视频平台 - 举报控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 举报控制层")
@RestController
@RequestMapping("/platform/report")
public class CvReportController {

    @Resource
    private CvReportService cvReportService;

    @PostMapping("save")
    @Operation(summary = "保存举报数据")
    public Result<Long> save(@RequestBody CvReportSaveReqVO reqVO) {
        return success(cvReportService.saveReport(reqVO));
    }

}
